﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Setup.aspx.cs" Inherits="THS.UMS.UI.Forms.Setup.Setup" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" href="Setup.css" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
                 <div class="user-head">
                    <div class="left user-head-title">
                        uManage Installation
                    </div>
                    <div class="right user-head-name">
                    </div>
                    <div class="clear">
                    </div>
                </div>       
                <div class="user-content">
                    <div class="left" style="width: 49%; margin-right: 2%;">
                        <div class="box">
                            <div class="head">
                                Instructions
                            </div>
                            <p>
                                <strong>Welcome to uManage!</strong>
                                <br />
                                To complete the installation of the system make sure to complete the tasks on this
                                screen. Additional configuration options are available once the system is installed.
                            </p>
                            <p>
                                You will not be able to leave this screen until all tasks have been verified. However,
                                you can close the browser and continue at any time.
                            </p>
                        </div>
                        <asp:Panel ID="pnlDBError" runat="server" Visible="false">
                        <div class="box">
                            <div class="head">
                                <div class="error">Database Error</div>
                            </div>
                            <p>
                                There was an error connecting to the database. Either the connection string is wrong or the database was not setup properly
                            </p>
                        </div>
                        </asp:Panel>
                    
                        <asp:Panel ID="pnlADCredentials" runat="server" Visible="false">
                        <div class="box">
                            <div class="head">
                                Enter Credentials for Active Directory
                            </div>
                            <p>
                                uManage requires information in order to connect to the directories on your network.
                                    If you have multiple domains within your forest make sure to specify an account
                                    with delegated permissions across all domains.
                            </p>
                            <asp:Panel ID="pnlADerror" runat="server" Visible="false">
                                <div class="error">Error Connecting to Active Directory for this user</div>
                            </asp:Panel>
                                <table class="form">
                                    <tbody>
                                        <tr>
                                            <th>
                                                Root Forest Domain:
                                            </th>
                                            <td>
                                                <asp:TextBox ID="txtAdDomain" runat="server" CssClass="text-req"></asp:TextBox>
                                                <br />
                                                Example: mydomain.local
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>
                                                User Principal Name:
                                            </th>
                                            <td>
                                                <asp:TextBox ID="txtAdUsername" runat="server" CssClass="text-req"></asp:TextBox>
                                                <br />
                                                Example: user@mydomain.local
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>
                                                Password:
                                            </th>
                                            <td>
                                                <asp:TextBox ID="txtAdPassword" runat="server" CssClass="text-req" 
                                                    TextMode="Password"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Button ID="btnCheckAD" runat="server" Text="Next" 
                                                    onclick="btnCheckAD_Click" />
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                        </div>
                        </asp:Panel>

                            <asp:Panel ID="pnlUser" runat="server" visible="false">
                            <div class="box">
                                <div class="head">
                                    User Permissions
                                </div>
                                <p>
                                    You must setup an initial administrative user. This user will have full access to
                                    uManage. Enter the User Principal Name (UPN) for the user in the textbox below.
                                </p>
                                <table class="form">
                                    <tbody>
                                        <tr>
                                            <th>
                                                User Principal Name:
                                            </th>
                                            <td>
                                                <asp:TextBox ID="txtUpnUser" runat="server" CssClass="text-req"></asp:TextBox>
                                                <br />
                                                Example: user@mydomain.local
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Button ID="btnAdminAdd" runat="server" Text="Next" 
                                                    onclick="btnAdminAdd_Click" />
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            </asp:Panel>

                        <asp:Panel ID="pnlOther" runat="server" Visible="false">
                            <div class="box">
                                <div class="head">
                                    Other Settings
                                </div>
                                <p>Enter the Application Name you would like displayed on the pages as well as the 
                                    URL you wish users to utilize. When the Finish button is pressed, final 
                                    configuration will be done and the application restarted in user mode.</p>
                                    <br />
                                    <ums:OutputMessage ID="omResult" runat="server" />
                                <table class="form">
                                    <tbody>
                                        <tr>
                                            <th>
                                                Application Title:
                                            </th>
                                            <td>
                                                <asp:TextBox ID="txtAppTitle" runat="server" CssClass="text-req"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>
                                                Application URL:
                                            </th>
                                            <td>
                                                <asp:TextBox ID="txtAppUrl" runat="server" CssClass="text-req"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Button ID="btnOther" runat="server" Text="Finish" 
                                                    onclick="btnOther_Click" />
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <br />
                        </asp:Panel>

                        <div class="box">
                            <div class="head">
                                Installation Progress
                            </div>
                            <div class="form">
                                <table class="form">
                                    <tbody>
                                        <tr>
                                            <td>
                                                Database Verified:
                                            </td>
                                            <td>
                                                <asp:Image runat="server" ImageUrl="~/Images/ClearStatusicon.png" AlternateText="Not Tested" ID="imageDB" CssClass="imgStatus" />
                                            </td>
                                            <td>
                                                &nbsp;Directory Verified:
                                            </td>
                                            <td>
                                                <asp:Image runat="server" ImageUrl="~/Images/ClearStatusicon.png" AlternateText="Not Tested" ID="imageAD" CssClass="imgStatus" />
                                            </td>
                                            <td>
                                                &nbsp;User Verified:
                                            </td>
                                            <td>
                                                <asp:Image runat="server" ImageUrl="~/Images/ClearStatusicon.png" AlternateText="Not Tested" ID="imageUser" CssClass="imgStatus" />
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    
                    
                    </div>
                </div>

        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
